define(
	[
	appBasePath + '/scripts/module.js',
	],
	function (substanceModule) {
    'use strict';
    substanceModule.controller('Demo.CreateController', [
        '$scope',
        '$state',
        'gbits.websns.substance.config',
        'Demo.TodoService',
        function($scope, $state, config, todoService) {
        	$scope.model = {
        		content :''        		
        	};
        	
        	$scope.create = function() {
        		todoService.create($scope.model).then(function(data) {
        			if (data) {
        				$state.go('kernel.appList.substance.list');
        			}        			
        		});
        	};
        }
    ]);
});